package com.example.lab2.service.assembler;

import com.example.lab2.api.dto.EmployeeDTO;
import com.example.lab2.domain.entity.Employee;

/**
 * @author Holinc
 * @date 2023/3/23 17:00
 */
public class EmployeeAssembler {
    private EmployeeAssembler() {

    }

    public static Employee toEmployee(EmployeeDTO employeeDTO) {
        Employee employee = new Employee();
        employee.setEmployeeId(employeeDTO.getEmployeeId());
        employee.setFirstName(employeeDTO.getFirstName());
        employee.setLastName(employeeDTO.getLastName());
        employee.setSalary(employeeDTO.getSalary());
        employee.setEmail(employeeDTO.getEmail());
        return employee;
    }
}
